# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        博智科技  
# Name:         demo1062
# Description:
# Author:       yzl
# Date:         2019-02-07
#-------------------------------------------------------------------------------

def enumList(nestedList):
    try:
        try:
            nestedList + ''
        except TypeError:
            pass
        else:
            raise TypeError
        for subList in nestedList:
            for element in enumList(subList):
                yield element
    except TypeError:
        yield nestedList

nestedList = [
    ['a'],
    'b',
    ['c',['c'],20.11],
    [['hello world']]
]

for num in enumList(nestedList):
    print(num,end=' ')


